// 导入数据库操作模块
const db = require('../db/index')
exports.payOk = (req,res)=>{
    let order_number = req.body.order_number;
    // postman测试
    // let order_number='20230306200539259867'
    // 定义SQL语句
    const sqlStr = 'update payorder set payStatus=true where order_number=?'
    db.query(sqlStr,order_number,(err,results)=>{
        // console.log(results);
        // 执行SQL语句失败
        if(err) return res.send(err)
        // 调用res.send将信息响应给客户端
        res.send({
            status:0,
            message:'支付成功！',
            result:results
        })
    })   
}